package org.jeecg.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 物料基础信息
 */
@Data
@TableName("wms_material")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "wms_material对象", description = "物料基础信息")
public class WmsMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 物料ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "物料ID")
    private String id;

    /**
     * 物料编号
     */
    @Excel(name = "物料编号", width = 15)
    @ApiModelProperty(value = "物料编号")
    private String materialCode;

    /**
     * 物料名称
     */
    @Excel(name = "物料名称", width = 20)
    @ApiModelProperty(value = "物料名称")
    private String materialName;

    /**
     * 物料类型（1:型材,2:配件,3:辅件,4:其他,5:余料,6:半料）
     */
    @Excel(name = "物料类型", width = 15, dicCode = "material_type")
    @ApiModelProperty(value = "物料类型（1:型材,2:配件,3:辅件,4:其他,5:余料,6:半料）")
    private String materialType;

    /**
     * 规格型号
     */
    @Excel(name = "规格型号", width = 15)
    @ApiModelProperty(value = "规格型号")
    private String specification;

    /**
     * 单位
     */
    @Excel(name = "单位", width = 10)
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 品牌
     */
    @Excel(name = "品牌", width = 15)
    @ApiModelProperty(value = "品牌")
    private String brand;

    /**
     * 颜色
     */
    @Excel(name = "颜色", width = 10)
    @ApiModelProperty(value = "颜色")
    private String color;

    /**
     * 长度（mm）
     */
    @Excel(name = "长度(mm)", width = 15)
    @ApiModelProperty(value = "长度（mm）")
    private BigDecimal length;

    /**
     * 宽度（mm）
     */
    @Excel(name = "宽度(mm)", width = 15)
    @ApiModelProperty(value = "宽度（mm）")
    private BigDecimal width;

    /**
     * 高度（mm）
     */
    @Excel(name = "高度(mm)", width = 15)
    @ApiModelProperty(value = "高度（mm）")
    private BigDecimal height;

    /**
     * 重量
     */
    @Excel(name = "重量", width = 15)
    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    /**
     * 单位成本
     */
    @Excel(name = "单位成本", width = 15)
    @ApiModelProperty(value = "单位成本")
    private BigDecimal unitCost;

    /**
     * 物料图片
     */
    @ApiModelProperty(value = "物料图片")
    private String materialImage;

    /**
     * 源物料编码（余料专用，记录余料来源的原型材）
     */
    @Excel(name = "源物料编码", width = 15)
    @ApiModelProperty(value = "源物料编码（余料专用，记录余料来源的原型材）")
    private String sourceMaterialCode;

    /**
     * 来源说明（余料专用，如切割余料、生产剩余等）
     */
    @Excel(name = "来源说明", width = 20)
    @ApiModelProperty(value = "来源说明（余料专用，如切割余料、生产剩余等）")
    private String sourceDesc;


    /**
     * 预警上限
     */
    @Excel(name = "预警上限", width = 15)
    @ApiModelProperty(value = "预警上限")
    private BigDecimal upperLimit;

    /**
     * 预警下限
     */
    @Excel(name = "预警下限", width = 15)
    @ApiModelProperty(value = "预警下限")
    private BigDecimal lowerLimit;

    /**
     * 余料上限
     */
    @Excel(name = "余料上限", width = 15)
    @ApiModelProperty(value = "余料上限")
    private BigDecimal remnantUpper;

    /**
     * 余料下限
     */
    @Excel(name = "余料下限", width = 15)
    @ApiModelProperty(value = "余料下限")
    private BigDecimal remnantLower;

    /**
     * 备注
     */
    @Excel(name = "备注", width = 30)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态（0:启用,1:禁用）
     */
    @Excel(name = "状态", width = 10, dicCode = "wms_material_status")
    @ApiModelProperty(value = "状态（0:启用,1:禁用）")
    private String status;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;
} 